package com.linkwings.dbTemp;

import java.util.List;

public class PageContainer<T> implements java.io.Serializable {
	
	private List<T> list;
	
	private List paramlist;
	
	private int dataSize=0;

	private int offset=0;
	
	private int pageTotal=1;
	
	private int pageSize=1;
	
	private String pageURI;
	
	public PageContainer(){
		
	}
	
	public PageContainer(List<T> list, int dataSize, int offset, int pageSize){
		this.list = list;
		this.dataSize = dataSize;
		this.offset = offset;
		this.pageSize = pageSize;
		
		if(dataSize>0){
			if ( dataSize % pageSize == 0 ) {
		    pageTotal = dataSize / pageSize;
	    } else {
		    pageTotal = dataSize / pageSize + 1;
	    }
		}
	}

	public int getDataSize() {
		return dataSize;
	}

	public void setDataSize(int dataSize) {
		this.dataSize = dataSize;
	}

	public List<T> getList() {
		return list;
	}

	public void setList(List<T> list) {
		this.list = list;
	}



	public int getOffset() {
		return offset;
	}

	public void setOffset(int offset) {
		this.offset = offset;
	}

	public int getPageTotal() {
		return pageTotal;
	}

	public void setPageTotal(int pageTotal) {
		this.pageTotal = pageTotal;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public String getPageURI() {
		return pageURI;
	}

	public void setPageURI(String pageURI) {
		this.pageURI = pageURI;
	}


	public List getParamlist() {
		return paramlist;
	}

	public void setParamlist(List paramlist) {
		this.paramlist = paramlist;
	}
	
}
